<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <#include "../common/header.ftl">
    <script>
        $(function () {
            $('.inputBtn').click(function () {
                $('#formalForm input').val("");
                $('#formalModal').modal('show');
            });

            $('.formalSubmit').click(function () {
                $('#formalForm').submit();
            });
        });
    </script>
</head>
<body>

<div class="container " style="margin-top: 20px">
    <#include "../common/top.ftl">
    <div class="row">
        <div class="col-sm-3">
            <#include "../common/menu.ftl">
        </div>
        <div class="col-sm-9">
            <div class="row">
                <div class="col-sm-12">
                    <h1 class="page-head-line">正式客户管理</h1>
                </div>
            </div>
            <a href="javascript:" class="btn btn-success inputBtn">
                <span class="glyphicon glyphicon-plus"></span> 添加
            </a>
            <table class="table table-striped table-hover" >
                <tr>
                    <th>编号</th>
                    <th>客户姓名</th>
                    <th>销售时间</th>
                    <th>销售课程</th>
                    <th>营销人员</th>
                </tr>
                <#list pageInfo.list as entity>
                    <tr>
                        <td>${entity_index+1}</td>
                        <td>${entity.customer.name}</td>
                        <td>${entity.vdate?string('y-M-d')}</td>
                        <td>${entity.curriculum.title}</td>
                        <td>${entity.seller.name}</td>
                    </tr>
                </#list>
            </table>
            <div style="text-align: center;">
                <#include "../common/page.ftl">
            </div>
        </div>
    </div>
</div>
<#--客户移交-->
<div class="modal fade" id="formalModal" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">编辑</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" action="/formalCustomer/save.do" method="post" id="formalForm">
                    <div class="form-group">
                        <label class="col-lg-4 control-label">客户：</label>
                        <div class="col-lg-6">
                            <select class="form-control" name="customer.id">
                                <#list cms as c>
                                    <option value="${c.id}">${c.name}</option>
                                </#list>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-4 control-label">课程：</label>
                        <div class="col-lg-6">
                            <select class="form-control" name="curriculum.id">
                                <#list curriculum as c>
                                    <option value="${c.id}">${c.title}</option>
                                </#list>
                            </select>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary formalSubmit">保存</button>
            </div>
        </div>
    </div>
</div>
</body>
</html>